import math

def find_point_on_line(first_x, first_y, next_x, next_y, d):
    """
    计算从点A向点B方向缩小距离d后的点坐标。
    :param A: 起点A的坐标，格式为(x, y)
    :param B: 终点B的坐标，格式为(x, y)
    :param d: 缩小的距离
    :return: 目标点C的坐标，格式为(x, y)
    """
    # 解构坐标
    Ax, Ay = first_x, first_y
    Bx, By = next_x, next_y
    # 计算向量AB
    dx = Bx - Ax
    dy = By - Ay
    # 计算向量AB的长度
    L = math.sqrt(dx ** 2 + dy ** 2)
    # 处理长度为0的情况（A和B重合）
    if L == 0:
        return (first_x, first_y)
    # 处理d超过线段长度的情况
    if d >= L:
        return (next_x, next_y)
    # 计算单位向量并缩放
    scale = d / L
    Cx = Ax + dx * scale
    Cy = Ay + dy * scale
    return (Cx, Cy)